package base

type MsgItem struct {
	Id           int64      `json:"id" db:"id"`
	MessageType  string     `json:"message_type" db:"message_type"`
	Title        string     `json:"title" db:"title"`
	Content      string     `json:"content" db:"content"`
	SenderId     string     `json:"sender_id" db:"sender_id"`
	ReceiverId   string     `json:"receiver_id" db:"receiver_id"`
	IsReaded     int32        `json:"is_readed" db:"is_readed"`
	ReceivedTime string  `json:"received_time" db:"received_time"`
	ReadedTime   string `json:"readed_time" db:"readed_time"`
	Link         string     `json:"link" db:"link"`
	CreatedBy    string     `json:"created_by" db:"created_by"`
	CreatedOn    string  `json:"created_on" db:"created_on"`
	ModifiedBy   string     `json:"modified_by" db:"modified_by"`
	ModifiedOn   string  `json:"modified_on" db:"modified_on"`
}

type GroupSummary struct {
	ReadedTotal           int64      `json:"readed_total" `
	UnreadedTotal  int64     `json:"unreaded_total"`
	AllTotal  int64     `json:"all_total"`
}

type MsgListData struct {
	List []*MsgItem `json:"list"`
	GroupSummary *GroupSummary `json:"group_summary"`
	Page int32 `json:"page"`
	PageSize int32 `json:"page_size"`
	Total int32 `json:"total"`
}

// 消息列表请求参数
type MsgListParam struct {
	IsReaded int32 `json:"is_readed"`
	// 页面信息
	Page     int32 `json:"page"`
	PageSize int32 `json:"page_size"`
}

type MsgSetReadedParam struct {
	Id  int64      `json:"id" db:"id"`
}
